﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for Contact
/// </summary>
public class Contact
{
    public int Contact_id { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
    public string Phone { get; set; }
    public string Title { get; set; }
    public string Content { get; set; }
    public DateTime DateStart { get; set; }
	public Contact()
	{
	    this.Contact_id = 0;
	    this.Name = "";
	    this.Email = "";
	    this.Phone = "";
	    this.Title = "";
	    this.Content = "";
	    this.DateStart = DateTime.Now;
	}
    public Contact(DataRow dr)
    {
        this.Contact_id = Convert.ToInt32(dr[0].ToString());
        this.Name = dr[1].ToString();
        this.Email = dr[2].ToString();
        this.Phone = dr[3].ToString();
        this.Title = dr[4].ToString();
        this.Content = dr[5].ToString();
        if (dr[6].ToString()!="")
            this.DateStart = DateTime.Parse(dr[6].ToString());
    }
}